package com.utils.basejava.concurrent.map;

import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import com.google.common.collect.Maps;

public class ConcurrentMapTest {
	public static void main(String[] args) {
		Map<String,String> map = Maps.newConcurrentMap();
		
		ConcurrentMap<String,String> map2 = new ConcurrentHashMap<String,String>();
		map2.put("1", "11");
		map2.put("2", "22");
		map2.put("3", "33");
		
		System.out.println(map2.get("2"));
		for (Entry<String,String> entry : map2.entrySet()) {
			System.out.println(entry.getKey()+"||"+entry.getValue());
		}
		System.out.println(map2.size());
	}
}
